console.log('this is background service-worker.ts file 000')

chrome.contextMenus.create(
    {
        id: 'setPageData',
        title: '修改页面数据',
        contexts: ['all']
    }
)

chrome.contextMenus.onClicked.addListener(
    (info) => {
        if(info.menuItemId === "setPageData") {
            const optionsPage = chrome.runtime.getURL('options/index.html')
            chrome.tabs.create({ url: optionsPage })
        }
    }
)